package com.zz.spring6.tx.controller;

import com.zz.spring6.tx.service.BookService;
import com.zz.spring6.tx.service.CheckoutService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class BookController {

//    @Autowired
//    private BookService bookService;
//
//    public void buyBook(Integer boosId,Integer userId){
//        bookService.buyBook(boosId,userId);
//    }

    @Autowired
    private CheckoutService checkoutService;
    @Test
    public void checkoutService(Integer[] bookId,Integer userId){
        checkoutService.checkout(bookId, userId);
    }

}
